rmb = 1000  #本金
rate = 0.04 # 利率
years = 0   # 年数
while True:
    if rmb > 2000:
        break
    rmb = rmb + (rmb*rate)
    years += 1

print("在",years,"年后能连本带息的翻番")
